﻿<%@ Control language="C#" Inherits="Store.SearchStore" CodeFile="SearchStore.ascx.cs" AutoEventWireup="true"%>
<%@ Register TagPrefix="dnn" TagName="Audit" Src="~/controls/ModuleAuditControl.ascx" %>
<asp:Label ID="lblResultCount" runat="server" CssClass="titleText3"></asp:Label><center>
<asp:Panel ID="pnlResult" runat="server" Width="100%"><TABLE class="table" width="100%"><TBODY><TR><TD colSpan=2><asp:CheckBox id="cbxCheckAll" CssClass="titleText3" runat="server" Text="Chọn tất cả" AutoPostBack="True" OnCheckedChanged="btnCheck_CheckedChanged"></asp:CheckBox></TD></TR><TR><TD colSpan=2><asp:GridView id="gvResult" CssClass="table" runat="server" Width="100%" DataSourceID="dsResult" AutoGenerateColumns="False" AllowPaging="True" OnPageIndexChanging="gvResult_PageIndexChanging" AllowSorting="True" OnSorted="gvResult_Sorted"><Columns>
<asp:TemplateField><ItemTemplate>
<asp:CheckBox id="cbxCheck" runat="server"></asp:CheckBox> 
</ItemTemplate>

<ItemStyle Width="5%" VerticalAlign="Middle"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="T&#234;n cửa h&#224;ng" SortExpression="storeName"><ItemTemplate>
&nbsp;<asp:HyperLink id="HyperLink1" runat="server" NavigateUrl='<%# GetURL(DataBinder.Eval(Container, "DataItem.storeId").ToString()) %>'><%# DataBinder.Eval(Container, "DataItem.storeName").ToString() %></asp:HyperLink><BR />&nbsp; 
</ItemTemplate>

<HeaderStyle HorizontalAlign="Left" VerticalAlign="Top"></HeaderStyle>
    <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Quản l&#253;" SortExpression="userId"><ItemTemplate>
<asp:HyperLink id="HyperLink2" runat="server" NavigateUrl='<%# GetEnterprise(DataBinder.Eval(Container, "DataItem.userId").ToString()) %>'><%# DataBinder.Eval(Container, "DataItem.fullName").ToString() %></asp:HyperLink>
</ItemTemplate>

<ItemStyle Width="25%" VerticalAlign="Middle"></ItemStyle>
</asp:TemplateField>
<asp:BoundField DataField="status" HeaderText="Trạng th&#225;i" SortExpression="status">
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>

<ItemStyle HorizontalAlign="Center" Width="10%" VerticalAlign="Middle"></ItemStyle>
</asp:BoundField>
<asp:TemplateField HeaderText="Ng&#224;y tạo" SortExpression="createDate"><ItemTemplate>
                        <asp:Label ID="Label3" runat="server" Text = '<%# ((DateTime)DataBinder.Eval(Container, "DataItem.createDate")).ToShortDateString() %>'></asp:Label>
                    
</ItemTemplate>

<HeaderStyle HorizontalAlign="Center"></HeaderStyle>

<ItemStyle HorizontalAlign="Center" Width="10%" VerticalAlign="Middle"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField Visible="False"><ItemTemplate>
                            <asp:Label ID="lblStoreId" runat="server" Text='<%# Bind("storeId") %>'></asp:Label>
                        
</ItemTemplate>
</asp:TemplateField>
</Columns>

<PagerStyle HorizontalAlign="Right"></PagerStyle>
    <HeaderStyle HorizontalAlign="Left" VerticalAlign="Top" />
</asp:GridView></TD></TR><TR><TD><asp:Label id="Label5" CssClass="titleText3" runat="server">Trạng thái :</asp:Label><asp:DropDownList id="ddlSetStatus" runat="server"></asp:DropDownList><asp:Button id="btnOk" onclick="btnOk_Click" CssClass="btn" runat="server" Width="80px" Text="Thiết lập"></asp:Button>
    &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp;
    <asp:Button id="btnDelete" onclick="btnDelete_Click" CssClass="btn" runat="server" Width="52px" Text="Xóa" OnClientClick="return confirm('Xóa cửa hàng đã chọn ?')"></asp:Button></TD><TD style="TEXT-ALIGN: right"><asp:Button id="btnExport" onclick="btnExport_Click" CssClass="btn" runat="server" Text="Xuất Excel"></asp:Button></TD></TR><TR><TD colSpan=2><BR /></TD></TR></TBODY></TABLE><asp:SqlDataSource id="dsResult" runat="server"></asp:SqlDataSource></asp:Panel>

<asp:Panel ID="pnlSearch" runat="server" Width="100%">
    <table width="100%" class="table">
        <tr>
            <td width="10%" >
            </td>
            <td width="15%"  >
                <asp:Label ID="Label1" runat="server" CssClass="titleText3">Tên cửa hàng :</asp:Label></td>
            <td  >
                <asp:TextBox ID="tbxStoreName" runat="server"></asp:TextBox></td>
        </tr>
        <tr>
            <td width="10%">
            </td>
            <td >
                <asp:Label ID="Label2" runat="server" CssClass="titleText3">Mô tả :</asp:Label></td>
            <td >
                <asp:TextBox ID="tbxDescription" runat="server" Width="60%"></asp:TextBox></td>
        </tr>
        <tr>
            <td width="10%">
            </td>
            <td >
                <asp:Label ID="Label3" runat="server" CssClass="titleText3">Trạng thái :</asp:Label></td>
            <td>
                <asp:DropDownList ID="ddlStatusS" runat="server">
                </asp:DropDownList></td>
        </tr>
        <tr>
            <td width="10%">
            </td>
            <td >
                <asp:Label ID="Label4" runat="server" CssClass="titleText3">Ngày tạo :</asp:Label></td>
            <td >
                <asp:TextBox ID="tbxFromDate" runat="server" Width="80px"></asp:TextBox>
                <asp:HyperLink ID="hlkFromDate" runat="server" ImageUrl="~/images/calendarAJ.png">HyperLink</asp:HyperLink>
                <asp:TextBox ID="tbxToDate" runat="server" Width="80px"></asp:TextBox>
                <asp:HyperLink ID="hlkToDate" runat="server" ImageUrl="~/images/calendarAJ.png"></asp:HyperLink></td>
        </tr>
        <tr>
            <td width="10%">
            </td>
            <td>
            </td>
            <td>
                <asp:Button ID="btnSearch" runat="server" Text="Tìm " Width="80px" OnClick="btnSearch_Click" CssClass="btn" />
                <asp:Button ID="btnReset" runat="server" Text="Làm lại" Width="80px" CssClass="btn" OnClick="btnReset_Click" />
                <asp:Button ID="btnAddNew" runat="server" Text="Thêm mới" Width="80px" CssClass="btn" OnClick="btnAddNew_Click" /></td>
        </tr>
        <tr>
            <td width="10%">
            </td>
            <td>
            </td>
            <td>
                <asp:Label ID="lblMessage" runat="server" CssClass="titleText3"></asp:Label></td>
        </tr>
    </table>
</asp:Panel>
</center>
<center>
    &nbsp;<asp:Label ID="lblDebugMessage" runat="server"></asp:Label></center>
